$(function(){
	$(".but").click(function() {		
		$('.ui.modal').modal('show');
		ajax({
			url : "upServlet?sid=" + $(this).attr('value'),
			callback : function(xmlhttp) {
				var ddd = document.getElementById('ddd');				 
				ddd.innerHTML="";
				
				var jsonStr;
				if (window.JSON) {
					jsonStr = JSON.parse(xmlhttp.response);
				} else {
					jsonStr = eval("(" + xmlhttp.response + ")");
				}
				if(jsonStr){			
					for(var i = 0;i< jsonStr.length;i++){
						var item = jsonStr[i];
						var div = document.createElement("div");		
						$(div).addClass("ui tall stacked segment");
						var p1 = document.createElement('p');
						var p2 = document.createElement('p');
						var op1 = document.createElement("span");
						var op2 = document.createElement("span");
						var op3 = document.createElement("span");
						var op4 = document.createElement("span");
						var op5 = document.createElement("span");
						var op6 = document.createElement("span");
						var op7 = document.createElement("span");
						
						op1.innerText ="缴费人：    " +item.orderCustName;
						p1.appendChild(op1);
						op2.innerText ="收款人：    "+ item.recordPayee ;
						$(op2).css("padding-left","100px");
						p1.appendChild(op2);
						op3.innerText =item.recordPaidtime ;
						$(op3).css("float","right");
						p1.appendChild(op3);
						
						op4.innerText ="本次缴费金额：      " +item.recordNowpaid + "  元";
						p2.appendChild(op4);
						op5.innerText ="已支付金额：      "+ item.recordPaid + "  元";
						$(op5).css("padding-left","80px");
						p2.appendChild(op5);  
						op6.innerText = "应交金额：     " + item.recordTotalmoney + "  元" ;
						$(op6).css("padding-left","80px");
						p2.appendChild(op6); 
						op7.innerText = "未交金额：     " + item.recordUnpaid + "  元" ;
						$(op7).css("padding-left","80px");
						p2.appendChild(op7);
						
						div.appendChild(p1);
						div.appendChild(p2);
						ddd.appendChild(div);						
					}
				}
			}
		});
	});
});